const mongoose = require('mongoose');
const Schema = mongoose.Schema;
// 创建约束条件
const studentSchema = new Schema({
    name: {
        type: String,
        unique: false,
        required: true,

    },
    age: Number,
    info: Schema.Types.Mixed,
    testDate: {
        type: Date,
        default: Date.now()
    }
})
// 创建模型对象
module.exports = mongoose.model('students', studentSchema);